package com.coolwen.dao;

import com.coolwen.entity.Team;

import java.util.List;
import java.util.Map;

public interface TeamMapper {
    int deleteByPrimaryKey(Integer teamId);

    int insert(Team record);

    int insertSelective(Team record);

    Team selectByPrimaryKey(Integer teamId);

    int updateByPrimaryKeySelective(Team record);

    int updateByPrimaryKey(Team record);

    int addTeamId(Integer teamId);


    /**
     * 查询所有队伍信息
     * @return
     */

    List<Team> selectAllTeam();


    /**
     * 计算队员人数
     * @return
     */


    int countMemberByTeamId(Integer memberTeam);


    /**
     * 计算约战场次
     * @param challengeTeamid
     * @return
     */

    int countChallengeByTeamId(Integer challengeTeamid);


    /**
     * 计算胜负平场次
     * @param params
     * @return
     */

    int selectResult(Map<String, Object> params);


    /**
     * 计算客场胜负平场次
     * @param params
     * @return
     */

    int selectAwayResult(Map<String, Object> params);



    /**
     * 通过球员名字查询球队
     * @param teamName
     * @return
     */


    List<Team> selectTeamByTeamName(String teamName);


}